home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
6
/
hsatxt.zip
/
HSA_TEXT.DOC
< prev
next >
Wrap
Text File
|
1988-07-02
|
78KB
|
1,981 lines
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
H S A _ T E X T H S A _ T E X T
Text Screen Control Library for C
by
Hardwood Software Associates
14-Apr-88 Page 1
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
Hardwood Software Associates ____________________________
HSA_TEXT is copyrighted by Hardwood Software Associates. You are granted
a limited license to use HSA_TEXT. You may also copy and distribute it,
provided that the following conditions are met:
1. No fee may be charged for such copying and distribution.
2. HSA_TEXT may ONLY be distributed in its original, unmodified state.
This library is being distributed as a shareware product. This means that if
you find this useful you should send $20.00 (USA currency or check only) to:
Hardwood Software Associates
364 Benson Road
Northbridge, Ma 01534
In exchange for this sum you will receive a disk containing the source code for
the library and distibution files for several other HSA libraries. Remember
only you can support shareware. Your support encourages growth. If you use ___
it you should support it. _______
Registration allows a single person to use an HSA library; multiple
programmers require multiple registrations.
Registered users may receive a source disk of the latest version of the
library by sending $10.00.
No royalties are required when HSA_TEXT functions are used, although we
would not refuse them if offered. We would appreciate a credit on the
title page of any applications that make use of HSA_TEXT. We would be
very interested in hearing how HSA_TEXT is used and would love to receive
copies of applications.
The author, Richard "Spike" Evans may be reached on CompuServe at
[75026,3604].
All comments and suggestions are welcome. We love to get mail.
Please be advised that all the usual non-warranty warranties apply to
HSA_TEXT. Hardwood Software Associates does not guarantee that HSA_TEXT
will do any thing useful at all; although it has for us. Nor does
Hardwood Software Associates warrant that HSA_TEXT will not do anything
harmful; although it has not for us.
Trademarks __________
IBM P.C. is a trademark of International Business Machines
Lattice is a trademark of Lattice, Inc.
14-Apr-88 Page 2
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
Microsoft C is a trademark of Microsoft Corporation
Turbo C is a trademark of Borland International
14-Apr-88 Page 3
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
INTRODUCTION ____________
HSA_TEXT is a library of 72 C functions that provide direct, fast control
over the IBM PC screen in text mode. The functions have been developed
and tested for the Microsoft version 5.00, and Turbo C version 1.5
compilers. HSA_TEXT is written entirely in assembler for speed and memory
efficiency.
The library is contained in several modules, grouped by function. These
modules are designed to prevent the inclusion of unused functions in your
program. These modules are:
TX_ATTR - Attribute Setting
TX_BLK - Functions that operate on blocks of screen
TX_CLR - Functions that clear portions of the screen
TX_CUR - Functions that control the cursor
TX_FILL - Character fill functions
TX_MISC - Miscellaneous functions
TX_MOWS - Mouse support functions
TX_SCROL - Screen scrolling functions
TX_STAT - Status functions
TX_STR - String display functions
MOWS_COM - Mouse functions common to GRAF and TEXT
STAT_COM - Functions common to GRAF and TEXT
This distribution contains two object library files:
SM_HSA_T.LIB - Small memory model library (Microsoft)
ST_HSA_T.LIB - Small memory model library (Turbo)
The library has also been tested with the Lattice version 3.10 compiler.
In an effort to keep download times low and because of lack of interest
the Lattice library is no longer included with the shareware distribution.
After receiving the source files, other memory models may be easily
created as required.
14-Apr-88 Page 4
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
GENERAL - "TX" FUNCTIONS ________________________
The "tx" functions are a set of low level functions that give you fast
efficient control of the text screen. Functions are provided to display
strings and characters on the screen. The screen attributes of the
displayed information is easily controlled. Sections of the screen may
be saved and restored to program memory. The size and location of the
cursor is easily manipulated.
The screen is addressed by row and column. The row and column addresses
passed to all functions are 0 based. The upper left corner of the
screen is row 0, column 0. The functions keep track of the next
sequential screen location (row and column), this location is
referred to as the current location. If the row address passed to any
function is equal to -1 the current location is used.
The functions that set the screen attribute, without displaying any
characters, set what is referred to as the current attribute.
There are several functions in this library that display C strings on the
screen. The screen location to start displaying the string may be
specified, or the current location may be used (functions with "_c" in
the name). The screen attribute for the string may also be specified
(functions with "_a" in the name), or the current attribute may be used.
The hsa_attr.h file contains definitions for attributes and a macro
(MAKE_ATTR) to aid in creating screen attributes.
The tx_mows functions in this library provide low level access to a
mouse. These functions support many different mice. Development and
testing was done with a Logitech mouse. Many of the functions return the
mouse type. These types are defined in the hsa_tx.h header file. Also
defined in the header file are definitions for the mouse buttons. Before
any of these functions are used tx_mows_reset must be called. This
document is designed to be used with the software documentation provided
with the mouse, therefore the details of the actions are not discussed.
The header file hsa_tx.h defines all the "tx" functions included in the
HSA_TEXT function library. Also included in hsa_tx.h are several useful
constants, macros, and structures.
Several of the functions have an entry in the documentation listing
called alias. This was done because these functions are particularly
difficult to spell.
Tx_demo.c contains the source code for the tx_demo.exe demonstration
program; it provides an example of how to use many of the tx functions.
Refer to MSC_TX.BAT and TCC_TX.BAT for information on how to compile and
link for the Microsoft and Turbo C compilers.
14-Apr-88 Page 5
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
NAME: MAKE_ATTR - Generate an attribute byte MAKE_ATTR
MODULE: MACRO in hsa_attr.h
SYNOPSIS: MAKE_ATTR (fore,back)
int fore; Foreground color
int back; Background color
DESCRIPTION: Generate an attribute byte from the desired foreground and
background colors. The colors defined in hsa_attr.h are:
SCR_BLACK,SCR_BLUE,SCR_GREEN,SCR_CYAN,SCR_RED,SCR_MAGENTA,
SCR_YELLOW,SCR_WHITE.
Also useful are SCR_INTENSE_BIT and SCR_BLINK_BIT which may
be ored with the attribute.
NAME: REVERSE_ATTR - Reverse foreground and background REVERSE_ATTR
MODULE: MACRO in hsa_attr.h
SYNOPSIS: REVERSE_ATTR (attr)
int attr; Attribute byte
DESCRIPTION: Swaps the foreground and background colors in the attribute
byte, preserving the intense and blink bits.
NAME: TX_ADAPT_1 - Returns current adapter type TX_ADAPT_1
MODULE: STAT_COM
SYNOPSIS: tx_adapt_1 ();
DESCRIPTION: Returns the type of adapter that is currently
being used by the BIOS
RETURNS: 1 = Monochrome (Hercules)
2 = Color
3 = EGA (64K memory)
4 = EGA (128K memory)
5 = EGA (192K memory)
6 = EGA (256K memory)
NAME: TX_ATTR - Read the current screen attribute TX_ATTR
MODULE: TX_STAT
SYNOPSIS: tx_attr ();
RETURNS: Current screen attribute
SEE ALSO: tx_attr_set,tx_b_b,tx_blink,tx_bold,tx_norm,
tx_reverse,tx_under
NAME: TX_ATTR_SET - Set the current screen attribute TX_ATTR_SET
MODULE: TX_STAT
SYNOPSIS: tx_attr_set (attribute);
short attribute; Attribute to use
DESCRIPTION: Set the current screen attribute.
NOTE: hsa_attr.h contains definitions for all attributes and
a MAKE_ATTR macro to create the attribute bytes.
SEE ALSO: tx_attr,tx_b_b,tx_blink,tx_bold,tx_norm,tx_reverse,tx_under
14-Apr-88 Page 6
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
NAME: TX_B_B - Set to intense blinking white on black TX_B_B
MODULE: TX_ATTR
SYNOPSIS: tx_b_b ();
DESCRIPTION: Set current attribute to intense blinking white on black.
SEE ALSO: tx_attr,tx_attr_set,tx_blink,tx_bold,tx_norm,
tx_reverse,tx_under
NAME: TX_BIOS - Use BIOS for all I/O TX_BIOS
MODULE: TX_STAT
SYNOPSIS: tx_bios ();
DESCRIPTION: Use BIOS calls for all operations to screen. Although this is
much slower than tx_direct, it is more portable.
SEE ALSO: tx_direct
NAME: TX_BLINK - Set to blinking white on black TX_BLINK
MODULE: TX_ATTR
SYNOPSIS: tx_blink ();
DESCRIPTION: Set current attribute to blinking white on black.
SEE ALSO: tx_attr,tx_attr_set,tx_b_b,tx_bold,tx_norm,tx_reverse,tx_under
NAME: TX_BOLD - Set to intense white on black TX_BOLD
MODULE: TX_ATTR
SYNOPSIS: tx_bold ();
DESCRIPTION: Set current attribute to intense white on black.
SEE ALSO: tx_attr,tx_attr_set,tx_b_b,tx_blink,tx_norm,
tx_reverse,tx_under
NAME: TX_CHR - Display a character at a specified location TX_CHR
MODULE: TX_FILL
SYNOPSIS: tx_chr (row,column,chr);
int row; Row for display
int column; Column for display
char chr; Character to display
DESCRIPTION: Move a character to the screen using the current screen
attribute.
SEE ALSO: tx_chr_a,tx_chr_c,tx_chr_a_c
NAME: TX_CHR_A - Display character at specified location TX_CHR_A
and attribute
MODULE: TX_FILL
SYNOPSIS: tx_chr_a (row,column,chr,attr);
int row; Row for display
int column; Column for display
char chr; Character to display
int attr; Attribute for character
DESCRIPTION: Move a character to the screen using the specified
screen attribute.
SEE ALSO: tx_chr,tx_chr_c,tx_chr_a_c,tx_chr_o,tx_chr_o_c
14-Apr-88 Page 7
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
NAME: TX_CHR_C - Display a character, continued from current TX_CHR_C
location
MODULE: TX_FILL
SYNOPSIS: tx_chr_c (chr);
char chr; Character to display
DESCRIPTION: Move the character to the screen using the current
screen attribute. The character is displayed on the
screen at the next current location.
SEE ALSO: tx_chr,tx_chr_a,tx_chr_a_c,tx_chr_o,tx_chr_o_c
NAME: TX_CHR_A_C - Display a character with specified TX_CHR_A_C
attribute, continued from current location
ALIAS: TX_CHR_C_A TX_CHR_C_A
MODULE: TX_FILL
SYNOPSIS: tx_chr_a_c (chr,attr);
tx_chr_c_a (chr,attr);
char chr; Character to display
int attr; Attribute for character
DESCRIPTION: Move the character to the screen using the specified
screen attribute. The character is displayed on the
screen at the current location.
SEE ALSO: tx_chr,tx_chr_a,tx_chr_c,tx_chr_o,tx_chr_o_c
NAME: TX_CHR_O - Display a character only at a specified location TX_CHR_O
MODULE: TX_FILL
SYNOPSIS: tx_chr_o (row,column,chr);
int row; Row for display
int column; Column for display
char chr; Character to display
DESCRIPTION: Move the character to the screen. Move the character only,
no change is made to the screen attribute of the screen.
This is useful when replacing existing screen data.
SEE ALSO: tx_chr,tx_chr_a,tx_chr_c,tx_chr_a_c,tx_chr_o_c
NAME: TX_CHR_O_C - Display a character only, continued TX_CHR_O_C
from current location
MODULE: TX_FILL
SYNOPSIS: tx_chr_o_c (chr);
char chr; Character to display
DESCRIPTION: Move the character to the screen at the current location.
Move the character only, no change is made to the screen
attribute of the screen.
SEE ALSO: tx_chr,tx_chr_a,tx_chr_c,tx_chr_a_c,tx_chr_o
NAME: TX_CLR - Clear the entire screen TX_CLR
MODULE: TX_CLR
SYNOPSIS: tx_clr ();
DESCRIPTION: Clears the screen to blanks, using the current screen
attribute.
SEE ALSO: tx_clr_a,tx_clr_eol,tx_clr_eol_a,tx_clr_rows,tx_clr_rows_a
14-Apr-88 Page 8
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
NAME: TX_CLR_A - Clear the entire screen TX_CLR_A
MODULE: TX_CLR
SYNOPSIS: tx_clr_a (attr);
int attr; Attribute for character
DESCRIPTION: Clears the screen to blanks, using the specified screen
attribute.
SEE ALSO: tx_clr_a,tx_clr_eol,tx_clr_eol_a,tx_clr_rows,tx_clr_rows_a
NAME: TX_CLR_EOL - Clear to the end of the line TX_CLR_EOL
MODULE: TX_CLR
SYNOPSIS: tx_clr_eol ();
DESCRIPTION: Clear the screen from the current location to the end of row,
using the current screen attribute.
SEE ALSO: tx_clr,tx_clr_a,tx_clr_eol_a,tx_clr_rows,tx_clr_rows_a
NAME: TX_CLR_EOL_A - Clear to the end of the line TX_CLR_EOL_A
MODULE: TX_CLR
SYNOPSIS: tx_clr_eol_a (attr);
int attr; Attribute for character
DESCRIPTION: Clear the screen from the current location to the end of row,
using the current screen attribute.
SEE ALSO: tx_clr,tx_clr_a,tx_clr_eol,tx_clr_rows,tx_clr_rows_a
NAME: TX_CLR_ROWS - Clear a block of lines on the screen TX_CLR_ROWS
MODULE: TX_CLR
SYNOPSIS: tx_clr_rows (start,end);
int start; First line to clear
(-1 if current)
int end; Last line to clear
(-1 if current)
DESCRIPTION: Clears the screen from the start line to the end line, using
the current screen attribute.
SEE ALSO: tx_clr,tx_clr_a,tx_clr_eol,tx_clr_eol_a,tx_clr_rows_a
NAME: TX_CLR_ROWS_A - Clear a block of lines on the screen TX_CLR_ROWS_A
MODULE: TX_CLR
SYNOPSIS: tx_clr_rows_a (start,end,attr);
int start; First line to clear
(-1 if current)
int end; Last line to clear
(-1 if current)
int attr; Attribute for character
DESCRIPTION: Clears the screen from the start line to the end line, using
the specified screen attribute.
SEE ALSO: tx_clr,tx_clr_a,tx_clr_eol,tx_clr_eol_a,tx_clr_rows
NAME: TX_COL - Read the current location column TX_COL
MODULE: TX_STAT
SYNOPSIS: tx_col ();
RETURNS: Current location column
SEE ALSO: tx_row,tx_up,tx_down,tx_nl,tx_loc
14-Apr-88 Page 9
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
NAME: TX_CONF - Set crt screen memory address and TX_CONF
6845 index register address
MODULE: TX_STAT
SYNOPSIS: tx_conf (tx_seg,tx_6845_i);
unsigned tx_seg; Segment address of crt
memory for direct mode
unsigned tx_6845_i; 6845 index register address
DESCRIPTION: If the arguments are not equal to 0 or -1 then
the segment for the screen memory and/or the 6845
index register address are updated.
CAUTION: This must be called after every call to tx_direct as
tx_direct sets the segment and 6845 address to the
default for the current monitor type.
SEE ALSO: tx_direct,tx_snow,tx_no_snow
NAME: TX_CUR_HIDE - Hide the cursor TX_CUR_HIDE
MODULE: TX_CUR
SYNOPSIS: tx_cur_hide ();
SEE ALSO: tx_cur_show,tx_cur_set
NAME: TX_CUR_SET - Set the cursor start / stop scan lines TX_CUR_SET
MODULE: TX_CUR
SYNOPSIS: tx_cur_set (start,end);
int start; Start scan line of cursor
int end; End scan line of cursor
DESCRIPTION: Set the size of the cursor.
SEE ALSO: tx_cur_hide,tx_cur_show
NAME: TX_CUR_SHOW - Show the cursor TX_CUR_SHOW
MODULE: TX_CUR
SYNOPSIS: tx_cur_show ();
SEE ALSO: tx_cur_hide,tx_cur_set
NAME: TX_DIRECT - Access screen hardware directly TX_DIRECT
MODULE: TX_STAT
SYNOPSIS: tx_direct ();
DESCRIPTION: Access screen directly. This is much faster but not
as portable as the BIOS mode.
NOTE: If the current state is not 7 (monochrome) tx_snow is
called to prevent screen interference.
SEE ALSO: tx_bios,tx_conf
NAME: TX_DOWN - Move the current location one row down TX_DOWN
MODULE: TX_CUR
SYNOPSIS: tx_down ();
SEE ALSO: tx_col,tx_row,tx_up,tx_down,tx_nl,tx_loc
14-Apr-88 Page 10
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
NAME: TX_FILL - Fill with the specified number of a character TX_FILL
MODULE: TX_FILL
SYNOPSIS: tx_fill (row,column,chr,number);
int row; Row for display
int column; Column for display
char chr; Character to display
int number; Number of times to
display character
DESCRIPTION: Move the character to the screen the specified
number of times using the current screen attribute.
SEE ALSO: tx_fill_a,tx_fill_c,tx_fill_a_c
NAME: TX_FILL_A - Fill with the specified number of a character TX_FILL_A
MODULE: TX_FILL
SYNOPSIS: tx_fill_a (row,column,chr,number,attr);
int row; Row for display
int column; Column for display
char chr; Character to display
int number; Number of times to
display character
int attr; Attribute to use
DESCRIPTION: Move the character to the screen the specified
number of times, using the specified attribute.
SEE ALSO: tx_fill,tx_fill_c,tx_fill_a_c
NAME: TX_FILL_C - Fill with the specified number of a TX_FILL_C
character, continued from current location
MODULE: TX_FILL
SYNOPSIS: tx_fill_c (chr,number);
char chr; Character to display
int number; Number of times to
display character
DESCRIPTION: Move the character to the screen the specified
number of times. Uses the current attribute.
Starts at current location.
SEE ALSO: tx_fill,tx_fill_a,tx_fill_a_c
NAME: TX_FILL_A_C - Fill with the specified number of a TX_FILL_A_C
character, continued from current location
ALIAS: TX_FILL_C_A TX_FILL_C_A
MODULE: TX_FILL
SYNOPSIS: tx_fill_a_c (chr,number,attr);
tx_fill_c_a (chr,number,attr);
char chr; Character to display
int number; Number of times to
display character
int attr; Attribute to use
DESCRIPTION: Move the character to the screen the specified
number of times. Starts at current location.
SEE ALSO: tx_fill,tx_fill_a,tx_fill_c
14-Apr-88 Page 11
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
NAME: TX_GET_STATUS / TX_PUT_STATUS - CRT status save/restore TX_GET_STATUS TX_PUT_STATUS
MODULE: TX_STAT
SYNOPSIS: tx_get_status (&buffer);
tx_put_status (&buffer);
struct Status buffer pointer
{
unsigned char mode;
unsigned char attribute;
unsigned short row,column;
} *buffer;
DESCRIPTION: Retrieves or sets the current CRT status.
NOTE: Structure defined as CRT_STATUS in hsa_tx.h
NAME: TX_LEFT - Move the current location one column left TX_LEFT
MODULE: TX_CUR
SYNOPSIS: tx_left ();
SEE ALSO: tx_col,tx_row,tx_up,tx_down,tx_nl,tx_loc
NAME: TX_LOC - Set the current location TX_LOC
MODULE: TX_CUR
SYNOPSIS: tx_loc (row,column);
int row; Row for display
int column; Column for display
DESCRIPTION: Move the cursor to the specified location.
SEE ALSO: tx_col,tx_row,tx_up,tx_down,tx_nl
NAME: TX_MOWS_BUTTON - Return status of buttons TX_MOWS_BUTTON
MODULE: MOWS_COM
SYNOPSIS: int tx_mows_button ();
DESCRIPTION: Get the current mouse button status.
RETURNS: FALSE - No buttons pressed.
bits set for buttons pressed:
MOWS_LEFT,MOWS_RIGHT,MOWS_MIDDLE (in hsa_tx.h)
NAME: TX_MOWS_HARD_CUR - Set hardware text cursor TX_MOWS_HARD_CUR
MODULE: TX_MOWS
SYNOPSIS: int tx_mows_hard_cur (start,stop);
int start; Start scan line of cursor (top)
int stop; Stop scan line
DESCRIPTION: Set the hardware cursor scan lines.
RETURNS: Mouse type:
MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
NAME: TX_MOWS_HIDE - Hide mouse cursor TX_MOWS_HIDE
MODULE: MOWS_COM
SYNOPSIS: int tx_mows_hide ();
DESCRIPTION: Hide the mouse cursor; if already hidden do nothing.
RETURNS: Mouse type:
MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
14-Apr-88 Page 12
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
NAME: TX_MOWS_LOC - Return location of mouse cursor TX_MOWS_LOC
MODULE: TX_MOWS
SYNOPSIS: int tx_mows_loc (row,col);
int *row,*col; Current cursor position pointer
DESCRIPTION: Get the current mouse cursor position. Screen
coordinates are in character units.
RETURNS: Mouse type:
MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
NAME: TX_MOWS_MOVE - Move mouse cursor to position TX_MOWS_MOVE
MODULE: TX_MOWS
SYNOPSIS: int tx_mows_move (row,col);
int row,col; Desired cursor position
DESCRIPTION: Move the cursor to the specified position.
CAUTIONS: The Mouse Systems driver requires that the cursor be
hidden before moving the cursor. If the cursor is not
hidden, the cursor stays where it is on the screen
until the mouse is moved then it starts from the new
location. The Logitech driver allows move to be called
anytime.
RETURNS: Mouse type:
MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
NAME: TX_MOWS_PRESS - Get count of button presses TX_MOWS_PRESS
MODULE: TX_MOWS
SYNOPSIS: int tx_mows_press (row,col,button);
int *row,*col; Cursor position at last press
int button; Desired button (see HSA_TX.H)
DESCRIPTION: Get the number of button presses of the specified
button since the last call of tx_mows_press.
RETURNS: Number of button presses
Location of last press (via *row,*col)
NAME: TX_MOWS_RELEASE - Get count of button releases TX_MOWS_RELEASE
MODULE: TX_MOWS
SYNOPSIS: int tx_mows_release (row,col,button);
int *row,*col; Cursor position at last release
int button; Desired button (see HSA_TX.H)
DESCRIPTION: Get the number of button releases of the specified
button since the last call of tx_mows_release.
RETURNS: Number of button releases
Location of last release (via *row,*col)
NAME: TX_MOWS_RESET - Reset the mouse driver TX_MOWS_RESET
MODULE: MOWS_COM
SYNOPSIS: int tx_mows_reset ();
DESCRIPTION: Determine if the mouse driver is loaded and there
is a mouse attached. Return the status of the mouse.
RETURNS: Mouse type:
MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
CAUTIONS: This function must be called before any other
mouse functions are called.
14-Apr-88 Page 13
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
NAME: TX_MOWS_SENSITIVITY - Set mouse sensitivity TX_MOWS_SENSITIVITY
MODULE: MOWS_COM
SYNOPSIS: int tx_mows_sensitivity (hor,ver);
int hor; horizontal mickey/pixel
int ver; vertical mickey/pixel
DESCRIPTION: Sets the sensitivity of the mouse motion.
RETURNS: Mouse type:
MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
NAME: TX_MOWS_SOFT_CUR - Set software text cursor TX_MOWS_SOFT_CUR
MODULE: TX_MOWS
SYNOPSIS: int tx_mows_soft_cur (scr_mask,cur_mask);
int scr_mask; Screen mask
int cur_mask; Cursor mask
DESCRIPTION: Set the software cursor character/attribute
RETURNS: Mouse type:
MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
NAME: TX_MOWS_SHOW - Show mouse cursor TX_MOWS_SHOW
MODULE: MOWS_COM
SYNOPSIS: int tx_mows_show ();
DESCRIPTION: Show the mouse cursor; if already visible do nothing.
RETURNS: Mouse type:
MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
NAME: TX_MOWS_TYPE - Return type of mouse TX_MOWS_TYPE
MODULE: MOWS_COM
SYNOPSIS: int tx_mows_type ();
DESCRIPTION: Return type of mouse.
RETURNS: Mouse type:
MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
NAME: TX_MOWS_WINDOW - Limit mouse motion to a window TX_MOWS_WINDOW
MODULE: TX_MOWS
SYNOPSIS: int tx_mows_window (row1,col1,row2,col2);
int row1,col1; Coords of upper left corner
int row2,col2; Coords of lower right corner
DESCRIPTION: Limit motion of mouse to within specified window.
RETURNS: Mouse type:
MOWS_NO,MOWS_MICRO,MOWS_MOUSE (in hsa_tx.h)
NAME: TX_NL - Move the current location to the start of next row TX_NL
MODULE: TX_CUR
SYNOPSIS: tx_nl ();
SEE ALSO: tx_col,tx_row,tx_up,tx_down,tx_nl,tx_loc
NAME: TX_NO_COL - Read the number of columns in screen TX_NO_COL
MODULE: TX_STAT
SYNOPSIS: tx_no_col ();
RETURNS: Number of columns on screen
14-Apr-88 Page 14
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
NAME: TX_NO_SNOW - Don't wait for retrace to prevent snow TX_NO_SNOW
MODULE: TX_STAT
SYNOPSIS: tx_no_snow ();
DESCRIPTION: Don't wait for retrace when accessing screen memory.
NOTE: This function should be called for color adapters
(e.g. EGA) that don't create snow when the screen
memory is accessed directly.
SEE ALSO: tx_snow,tx_direct
NAME: TX_NORM - Set to white on black TX_NORM
MODULE: TX_ATTR
SYNOPSIS: tx_norm ();
DESCRIPTION: Set current attribute to white on black.
SEE ALSO: tx_attr,tx_attr_set,tx_b_b,tx_blink,tx_bold,
tx_reverse,tx_under
NAME: TX_RD_BLK - Read a block of screen data TX_RD_BLK
MODULE: TX_BLK
SYNOPSIS: tx_rd_blk (row,column,buffer,no_row,no_column);
int row; Row to read
int column; Column to read
int *buffer; Buffer address
int no_row; Number of rows to read
int no_column; Number of columns to read
DESCRIPTION: Read a block of screen memory, character and
attribute, into the buffer.
NOTE: The current location is set to row,column.
SEE ALSO: tx_rd_blk_c,tx_wr_blk,tx_wr_blk_c
NAME: TX_RD_BLK_C - Read a block of screen data, at current location TX_RD_BLK_C
MODULE: TX_FILL
SYNOPSIS: tx_rd_blk_c (buffer,no_row,no_column);
int *buffer; Buffer address
int no_row; Number of rows to read
int no_column; Number of columns to read
DESCRIPTION: Read a block of screen memory, character and
attribute, into the buffer.
NOTE: The current location is unchanged.
SEE ALSO: tx_rd_blk,tx_wr_blk,tx_wr_blk_c
NAME: TX_RD_STR - Read string from screen TX_RD_STR
MODULE: TX_MISC
SYNOPSIS: char *tx_rd_str (row,col,string,number);
int row; Row to read
int column; Column to read
char *string; Buffer address
short number; Number characters to read
DESCRIPTION: Reads the characters displayed on the screen into the
string buffer.
RETURNS: Pointer to string
NOTE: Current location remains unchanged
SEE ALSO: tx_rd_str_c
14-Apr-88 Page 15
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
NAME: TX_RD_STR_C - Read string from screen at current location TX_RD_STR_C
MODULE: TX_MISC
SYNOPSIS: char *tx_rd_str_c (string,number);
char *string; Buffer address
short number; Number characters to read
DESCRIPTION: Reads the characters displayed on the screen into the
string buffer.
RETURNS: Pointer to string
NOTE: Current location remains unchanged
SEE ALSO: tx_rd_str
NAME: TX_REVERSE - Set to black on white TX_REVERSE
MODULE: TX_ATTR
SYNOPSIS: tx_reverse ();
DESCRIPTION: Set current attribute to black on white.
SEE ALSO: tx_attr,tx_attr_set,tx_b_b,tx_blink,tx_bold,tx_norm,tx_under
NAME: TX_RIGHT - Move the current location one column right TX_RIGHT
MODULE: TX_CUR
SYNOPSIS: tx_right ();
SEE ALSO: tx_col,tx_row,tx_up,tx_down,tx_nl,tx_loc
NAME: TX_ROW - Read the current location row TX_ROW
MODULE: TX_STAT
SYNOPSIS: tx_row ();
RETURNS: Current location row
SEE ALSO: tx_col,tx_up,tx_down,tx_nl,tx_loc
NAME: TX_SCDN - Scroll screen down one line TX_SCDN
MODULE: TX_SCROL
SYNOPSIS: tx_scdn (row,column,no_row,no_column);
int row,column; Upper left row/column
(-1 for current)
int no_row; Number of rows to scroll
int no_column; Number of columns to scroll
DESCRIPTION: Scrolls the specified portion of the screen down one row,
using the current attribute.
SEE ALSO: tx_scup,tx_scdn_a,tx_up_a
NAME: TX_SCDN_A - Scroll screen down one line TX_SCDN_A
MODULE: TX_SCROL
SYNOPSIS: tx_scdn_a (row,column,no_row,no_column,attr);
int row,column; Upper left row/column
(-1 for current)
int no_row; Number of rows to scroll
int no_column; Number of columns to scroll
int attr; Attribute for character
DESCRIPTION: Scrolls the specified portion of the screen down one row,
using the specified attribute.
SEE ALSO: tx_scup,tx_scdn_a,tx_up_a
14-Apr-88 Page 16
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
NAME: TX_SCUP - Scroll screen up one line TX_SCUP
MODULE: TX_SCROL
SYNOPSIS: tx_scup (row,column,no_row,no_column);
int row,column; Upper left row/column
(-1 for current)
int no_row; Number of rows to scroll
int no_column; Number of columns to scroll
DESCRIPTION: Scrolls the specified portion of the screen up one row,
using the current attribute.
SEE ALSO: tx_scdn,tx_scdn_a,tx_up_a
NAME: TX_SCUP_A - Scroll screen up one line TX_SCUP_A
MODULE: TX_SCROL
SYNOPSIS: tx_scup_a (row,column,no_row,no_column,attr);
int row,column; Upper left row/column
(-1 for current)
int no_row; Number of rows to scroll
int no_column; Number of columns to scroll
int attr; Attribute for character
DESCRIPTION: Scrolls the specified portion of the screen up one row,
using the specified attribute.
SEE ALSO: tx_scup,tx_scdn_a,tx_up_a
NAME: TX_SNOW - Wait for retrace to prevent snow TX_SNOW
MODULE: TX_STAT
SYNOPSIS: tx_snow ();
DESCRIPTION: Wait for retrace when accessing screen memory.
NOTE: Only applicable for direct mode on CGA adapters.
SEE ALSO: tx_no_snow,tx_direct
NAME: TX_STATE - Returns current video state TX_STATE
MODULE: STAT_COM
SYNOPSIS: tx_state ();
DESCRIPTION: Calls BIOS INT 10 with function code 15 to get the
current video state.
RETURNS: Text modes:
0 = 40x25 Black and white
1 = 40x25 Color
2 = 80x25 Black and white
3 = 80x25 Color
Graphics modes:
4 = 320x200 4 Color
5 = 320x200 Black and white
6 = 640x200 Black and white
7 = Monochrome
D = 320x200 16 Color (EGA)
E = 640x200 16 Color (EGA)
F = 640x350 4 Color Monochrome (EGA)
10 = 640x350 16 Color (EGA)
64 = 640x400 Black and white (AT&T)
14-Apr-88 Page 17
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
NAME: TX_STR - Display string at specified location TX_STR
MODULE: TX_STR
SYNOPSIS: tx_str (row,column,string);
int row; Row for string display
int column; Column for string display
char *string; Pointer to string
DESCRIPTION: Move the string to the screen using the current
attribute. The row and column specified in the
call are used for the first character in the string.
SEE ALSO: tx_str_a,tx_str_c,tx_str_a_c
NAME: TX_STR_A - Display string at specified location and attribute TX_STR_A
MODULE: TX_STR
SYNOPSIS: tx_str_a (row,column,string,attr);
int row; Row for string display
int column; Column for string display
char *string; Pointer to string
int attr; Attribute for string
DESCRIPTION: Move the string to the screen using the specified
screen attribute. The row and column specified in
the call are used for the first character in the string.
SEE ALSO: tx_str,tx_str_c,tx_str_a_c
NAME: TX_STR_C - Display a string, continued from current location TX_STR_C
MODULE: TX_STR
SYNOPSIS: tx_str_c (string);
char *string; Pointer to string
DESCRIPTION: Move the string to the screen using the current
attribute. The string is displayed on the screen
in the next available location.
SEE ALSO: tx_str,tx_str_a,tx_str_a_c
NAME: TX_STR_A_C - Display a string, continued from TX_STR_A_C
current location with specified attribute
ALIAS: TX_STR_C_A TX_STR_C_A
MODULE: TX_STR
SYNOPSIS: tx_str_a_c (string,attr);
tx_str_c_a (string,attr);
char *string; Pointer to string
int attr; Attribute for string
DESCRIPTION: Move the string to the screen using the specified
screen attribute. The string is displayed on the
screen in the next available location.
SEE ALSO: tx_str,tx_str_a,tx_str_c
NAME: TX_UNDER - Set to underlined TX_UNDER
MODULE: TX_ATTR
SYNOPSIS: tx_under ();
DESCRIPTION: Set current attribute to underlined.
CAUTION: In color this is blue.
SEE ALSO: tx_attr,tx_attr_set,tx_b_b,tx_blink,tx_bold,tx_norm,tx_reverse
14-Apr-88 Page 18
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
NAME: TX_UP - Move the current location one row up TX_UP
MODULE: TX_CUR
SYNOPSIS: tx_up ();
SEE ALSO: tx_col,tx_row,tx_down,tx_nl,tx_loc
NAME: TX_WR_BLK - Write a block of screen data TX_WR_BLK
MODULE: TX_FILL
SYNOPSIS: tx_wr_blk (row,column,buffer,no_row,no_column);
int row; Row to write
int column; Column to write
int *buffer; Buffer address
int no_row; Number of rows to write
int no_column; Number of columns to write
DESCRIPTION: Write a block of screen memory, character and
attribute, from the buffer.
NOTE: The current location is set to row,column.
SEE ALSO: tx_rd_blk,tx_rd_blk_c,tx_wr_blk_c
NAME: TX_WR_BLK_C - Write a block of screen data, TX_WR_BLK_C
at current location
MODULE: TX_FILL
SYNOPSIS: tx_wr_blk_c (buffer,no_row,no_column);
int *buffer; Buffer address
int no_row; Number of rows to write
int no_column; Number of columns to write
DESCRIPTION: Write a block of screen memory, character and
attribute, from the buffer.
NOTE: The current location is unchanged.
SEE ALSO: tx_rd_blk,tx_rd_blk_c,tx_wr_blk
14-Apr-88 Page 19
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
Useful Screen Attributes and Macros ___________________________________
The following constants and macros are defined in hsa_attr.h and are
useful in generating screen attributes.
/******************************************************************/
/* */
/* H S A _ A T T R . H - Various Screen Attributes and Macro */
/* */
/******************************************************************/
/******************************************************************/
/* */
/* Copyright (c) Hardwood Software Associates 1988 */
/* */
/* Hardwood Software Associates */
/* 364 Benson Road */
/* Northbridge, Ma 01534 */
/* */
/******************************************************************/
/******************************************************************
* H S A _ A T T R . H E D I T L O G
*
* $Log: D:/CRT/VCS/HSA_ATTR.H_V $
*
* Rev 1.2 02 Jul 1988 7:28:38 R. Evans
* Add MAKE_PAL
*
* Rev 1.1 01 May 1988 10:45:22 R. Evans
* Remove tabs for inclusion in documentation
*
* Rev 1.0 30 Apr 1988 22:10:44 R. Evans
* Initial revision.
******************************************************************/
#ifndef HSA_ATTRIBUTES
#define HSA_ATTRIBUTES
/* Monochrome Attributes */
#define SCR_NORM 0x07 /* Normal characters */
#define SCR_BOLD 0x0F /* Bold characters */
#define SCR_BLINK 0x87 /* Blinking characters */
#define SCR_REVERSE 0x70 /* Reverse video characters */
#define SCR_UNDER 0x01 /* Underlined characters */
#define SCR_B_B 0x8F /* Blinking bold characters */
#define SCR_B_U 0x09 /* Blinking underlined characters */
/* Colors */
#define SCR_BLACK 0x0
#define SCR_BLUE 0x1
#define SCR_GREEN 0x2
#define SCR_CYAN 0x3
14-Apr-88 Page 20
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
#define SCR_RED 0x4
#define SCR_MAGENTA 0x5
#define SCR_YELLOW 0x6
#define SCR_WHITE 0x7
#define SCR_INTENSE_BIT 0x08 /* Intensty bit */
#define SCR_BLINK_BIT 0x80 /* Blink bit */
/* Create attribute byte */
#define MAKE_ATTR(fore,back) (((back)<<4) | (fore))
/* Reverse foreground nd background */
#define REVERSE_ATTR(a) ((a&0x80)|(a&0x08)|((a&0x07)<<4)|((a&0x70)>>4))
/* Create Palette Value */
#define MAKE_PAL(intense,normal) ((intense<<3)|normal)
/* CRT states */
#define MONOCHROME 0x7
#define CGA 0x6
#define EGA 0x10
/* MOUSE definitions */
#define MOWS_LEFT 0 /* Left button */
#define MOWS_RIGHT 1 /* Right button */
#define MOWS_MIDDLE 2 /* Middle button */
#define MOWS_NO 0 /* No mouse (or driver) */
#define MOWS_MICRO 2 /* Microssoft mouse installe */
#define MOWS_MOUSE 3 /* Mouse Systems mouse installed */
#endif
14-Apr-88 Page 21
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
HSA_TEXT Change History _______________________
Version Date Functions Modifications __________________________________________________________________________
3.01 28-Feb-87 All Released to the public
3.02 23-May-87 w_* Window functions added
3.03 25-Jun-87 hsa_test.doc Rewritten documentation
w_user_border New
w_str_a New
w_str_c_a New
14-Jul-87 hsa_help.c Added get_char
3.04 9-Aug-87 w_menu1.c Memory allocation error
on "last_page_save";
caused crash after
several multipage calls
3.05 10-Sep-87 Turbo C support
3.06 7-Nov-87 w_menu1.c Mouse support
tx_mows.asm
12-Nov-87 tx_misc.asm tx_rd_str returned pointer
incorrectly for large data
models
tx_str.asm tx_str corrupted DS in large
data model
18-Nov-87 w_close.c Return NULL pointer
hsa_w.h ...
w_str.c Add w_nl
w_open Add w_open_ns
w_center New
3.07 26-Dec-87 hsa_text.pcw New documentation
3-Jan-88 tx_stat.asm Use word OUTs in
ALIGN_CURSOR, remove extra
divide from GET_CURSOR_POS
tx_clr.asm New: tx_clr_a,tx_clr_eol_a,
tx_clr_rows_a
4.00 5-Feb-88 Move window routines to
hsa_win library
TX_COMM.ASM Move tx_state to
TX_STATUS.ASM tx_comm, add tx_adapt_1
TX_SCROL.ASM New:tx_scup_a,tx_dn_a
4.01 12-Mar-88 Minor documentation
changes
4.02 12-Apr-88 TX_STAT.ASM Check current mode on calls
to tx_bios & tx_direct
18-Apr-88 STAT_COM.ASM Replace tx_comm with STAT_COM
TX_MOWS Move tx_mows_reset, tx_mows_type,
tx_mows_show, tx_mows_hide,
tx_mows_button, and
tx_mows_sensitivity to MOWS_COM
14-Apr-88 Page 22
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
21-Apr-88 HSA_TX.H Add REVERSE_ATTR macro
14-Apr-88 Page 23
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
Alphabetical List of HSA_TEXT Functions (4.02) ______________________________________________
TX_ADAPT_1 Returns current adapter type
TX_ATTR Read the current screen attribute
TX_ATTR_SET Set the current screen attribute
TX_BIOS Use BIOS for all I/O
TX_BLINK Set to blinking white on black
TX_BOLD Set to intense white on black
TX_B_B Set to intense blinking white on black
TX_CHR Display a character at a specified location
TX_CHR_A Display character using specified location and attribute
TX_CHR_A_C Continue display of character with specified attribute
TX_CHR_C Continue display of character
TX_CHR_O Display a character only at specified location
TX_CHR_O_C Display a character only, continued from current location
TX_CLR Clear the entire screen
TX_CLR_A Clear the entire screen, specified attribute
TX_CLR_EOL Clear to the end of the line
TX_CLR_EOL_A Clear to the end of the line, specified attribute
TX_CLR_ROWS Clear a block of lines on the screen
TX_CLR_ROWS_A Clear a block of lines on the screen, specified attribute
TX_COL Read the current cursor column
TX_CONF Set crt screen memory address and 6845 address
TX_CUR_HIDE Hide the cursor
TX_CUR_SET Set the cursor start / stop scan lines
TX_CUR_SHOW Show the cursor
TX_DIRECT Access screen hardware directly
TX_DOWN Move the current location one row down
TX_FILL Fill a line with the specified number of a character
TX_FILL_A Fill a line with the specified number of a character
TX_FILL_A_C Fill a line with the specified number of a character
TX_FILL_C Fill a line with the specified number of a character
TX_GET_STATUS CRT status save
TX_LEFT Move the current location one column left
TX_LOC Set the current location
TX_MOWS_RESET Reset the mouse driver
TX_MOWS_TYPE Return type of mouse
TX_MOWS_SHOW Show mouse cursor
TX_MOWS_HIDE Hide mouse cursor
TX_MOWS_MOVE Move mouse cursor to specified position
TX_MOWS_LOC Return current location of mouse cursor
TX_MOWS_BUTTON Return status of buttons
TX_MOWS_PRESS Get count of button pressed
TX_MOWS_RELEASE Get count of button releases
TX_MOWS_WINDOW Limit motion of mouse to within window
TX_MOWS_HARD_CUR
Set hardware text cursor
TX_MOWS_SOFT_CUR
Set software text cursor
14-Apr-88 Page 24
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
TX_MOWS_SENSITIVITY
Set mouse sensitivity
TX_NL Move the current location to the start of the next line
TX_NORM Set to white on black
TX_NO_COL Read the number of columns in screen
TX_NO_SNOW Don't wait for retrace to prevent snow
TX_PUT_STATUS CRT status restore
TX_RD_BLK Read a block of screen data
TX_RD_BLK_C Read a block of screen data, at current location
TX_RD_STR Read string from screen
TX_RD_STR_C Read string from screen at current location
TX_REVERSE Set to black on white
TX_RIGHT Move the current location one column right
TX_ROW Read the current cursor row
TX_SCDN Scroll window down one line
TX_SCDN_A Scroll window down one line, specified attribute
TX_SCUP Scroll window up one line
TX_SCUP_A Scroll window up one line, specified attribute
TX_SNOW Wait for retrace to prevent snow
TX_STATE Returns current video state
TX_STR Display string at specified location
TX_STR_A Display string using specified location and attribute
TX_STR_A_C Display a string, continued from current location
TX_STR_C Display a string, continued from current location
TX_UNDER Set to underlined
TX_UP Move the current location one row up
TX_WR_BLK Write a block of screen data
TX_WR_BLK_C Write a block of screen data, at current location
14-Apr-88 Page 25
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
Companion Libraries ___________________
Hardwood Software Associates has developed two companion libraries to the
HSA_TEXT library.
The HSA_WIN is a library of 25 C functions that provide a powerful, yet
simple, windowing capability. The windows created and maintained by this
library are of the "pop-up" variety. A window is simply defined as an
area of the screen that is first saved when the window is opened,
manipulated by the various window functions, and finally restored to its
original state when the window is closed. Windows may coexist on the
screen with text presented via other means. Windows may optionally be
bordered with any of several different border characters. Window titles
may optionally appear in the top or bottom border. Files may be displayed
and scrolled through in a window. Two different menu styles are implemented
in windows. The functions have been developed and tested for the Microsoft
version 5.00, and Turbo C version 1.5 compilers. HSA_WIN is written in C
for speed and memory efficiency.
HSA_GRAF is a library of 84 C functions that provide you with a direct,
fast ability to create graphics on any one of the three major graphics
boards available for the IBM P.C. (Color Graphics Adapter (CGA), Enhanced
Graphics Adapter (EGA), and the Hercules Graphics Board). A single setup
call establishes the board in use. All functions used to create the
actual graphics are device independent. Functions are included to allow
easy programming of a mouse. The functions have been developed and
tested for the Microsoft C version 5.10, and Turbo C version 1.5
compilers. This library has two divisions. All basic graphics functions
begin with the prefix "g_". The other division, prefixed with "gs_"
allows for creating scaled graphics. HSA_GRAF is written in assembler and
C for speed and memory efficiency.
14-Apr-88 Page 26
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
Alphabetical List of HSA_WIN Functions (4.04) _____________________________________________
W_BOT_MSG Display a message in the bottom border line
W_CENTER Display a string centered in a window
W_CENTER_A Display a string centered, specified attribute
W_CLOSE Close a window
W_CLR Clear a window
W_CLR_EOL Clear to end of line in window
W_CUR_LOC Display the screen cursor in the window
W_FILE_NAME Display a named file in a window
W_FILE_PTR Display a pointed to file in a window
W_MENU1_FILL Fill a style 1 menu with data
W_MENU1_OPEN Open a menu style 1 window
W_MENU2 Highlighted keyword style menu
W_MOVE Move a window
W_NL Move cursor to start of next line
W_OPEN Open a window
W_OPEN_NS Open a window (no screen save)
W_SCDN Scroll data in window down
W_SCUP Scroll data in window up
W_STR Display a string in a window
W_STR_C Display a string in a window, at current location
W_STR_A Display a string in a window, with attribute
W_STR_C_A Display a string in a window, at current location
W_STR_COL Display a string in a window column
W_TOP_MSG Display a message in the top border line
W_USER_BORDER Set characters for user border
14-Apr-88 Page 27
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
Alphabetical List of HSA_GRAF Functions (1.11) ______________________________________________
COS_REC Compute the reciprocal of cos
DISP_GRAPH Set the display to graphics mode
DISP_GRAPH_CLR Set the display to graphics mode and clear screen
DISP_TEXT Set the board to the text mode
GS_ARC Draw a circular arc (scaled)
GS_CIRCLE Draw a full circle (scaled)
GS_FILL Fill an area from seed (scaled)
GS_LINE Draw a line (scaled)
GS_LINE_H Draw a horizontal line (scaled)
GS_LINE_C Draw a line continued from current location (scaled)
GS_LOC Return current location (scaled)
GS_MOVE Set current position (scaled)
GS_MOWS_MOVE Move mouse cursor to specified position
GS_MOWS_LOC Return current location of mouse cursor
GS_MOWS_PRESS Get count of button pressed
GS_MOWS_RELEASE Get count of button releases
GS_MOWS_WINDOW Limit motion of mouse to within window
GS_POINT Set a point (scaled)
GS_RECT Draw a rectangle (scaled)
GS_RPOLY Draw a regular polygon (scaled)
GS_R_POINT Return the color of the specified point
GS_ROTATE Rotate coordinates
GS_SET_DEFAULT_FONT
Set default text font
GS_STR_H Display a horizontal message on screen
GS_TEXT Display text at specified location, height, angle
GS_TEXT_FONT Set character font
GS_TEXT_SPACE Set character spacing
G_ADAPT_1 Return current adaptor type
G_BACK_COLOR Set background color
G_BS_H Back space one character position
G_CGA_HR Use IBM CGA in high resolution (640x200)
G_CLR Clear the current graphics page
G_DASH Set line type to dashed
G_DOT Set line type to dotted
G_EGA_HR_CO Use IBM EGA in high resolution
G_EGA_LR_CO Use IBM EGA in low resolution
G_EGA_RESTORE Restore saved EGA screen
G_EGA_SAVE Save EGA screen
G_FILL Fill an area from a seed
G_FORE_COLOR Set foreground color
G_FREE Free screen save buffer
G_GETS Get a string from console in graphics mode
G_HERC Use Hercules monochrome graphics board
G_HERC_HALF Set Hercules board to half graphics mode
G_LINE Draw a line
G_LINE_H Draw a horizontal line
G_LINE_C Draw a line continued from current location
14-Apr-88 Page 28
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
G_LOC Return current location
G_MALLOC Allocate screen save buffer
G_MAP_SIZE Compute size of screen map
G_MODE Set mode for screen drawing
G_MOVE Set current position
G_MOWS_RESET Reset the mouse driver
G_MOWS_TYPE Return type of mouse
G_MOWS_SHOW Show mouse cursor
G_MOWS_HIDE Hide mouse cursor
G_MOWS_MOVE Move mouse cursor to specified position
G_MOWS_LOC Return current location of mouse cursor
G_MOWS_BUTTON Return status of buttons
G_MOWS_PRESS Get count of button pressed
G_MOWS_RELEASE Get count of button releases
G_MOWS_WINDOW Limit motion of mouse to within window
G_MOWS_CUR Set graphics mouse cursor
G_MOWS_SENSITIVITY
Set mouse sensitivity
G_ORIGIN Set screen origin location
G_OTHER Use another variety of graphics adapter
G_PAGE Set graphics page for Hercules
G_POINT Set the specified pixel in the current
G_RECT Draw a rectangle
G_REVERSE_COLOR Swap foreground and background
G_R_ORIGIN Return the current origin location
G_R_POINT Return the color of the specified point
G_SCALE Set screen scale factors
G_SCR_RESTORE Restore the graphics screen image from buffer
G_SCR_SAVE Save the current graphics screen image in buffer
G_SCREEN Return size of screen
G_SET_LINE Set line type mask
G_SET_PALLET_REG Set palette register
G_SOLID Set line type to solid
G_STATE Returns current video state
G_STR_H Display a horizontal message on screen
G_XDOTS Get X scale factor
G_YDOTS Get Y scale factor
SIN_REC Compute the reciprocal of sin
14-Apr-88 Page 29
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V4.02) HSA_TEXT - Text Mode Screen Control Library (V4.02)
Hardwood Software Associates Order Form
Please send me the following HSA libraries, new registration:
HSA_GRAF Graphics library $20.00 ____
HSA_TEXT Text Screen / Mouse Library $20.00 ____
HSA_WIN Windowing Library (requires HSA_TEXT) $20.00 ____
Please send me the updates for following HSA libraries:
HSA_GRAF Graphics library $10.00 ____
HSA_TEXT Text Screen / Mouse Library $10.00 ____
HSA_WIN Windowing Library (requires HSA_TEXT) $10.00 ____
I am currently using the following version of each library:
HSA_GRAF Graphics library ____
HSA_TEXT Text Screen / Mouse Library ____
HSA_WIN Windowing Library (requires HSA_TEXT) ____
Please send check or money order (USA currency only please) to:
Hardwood Software Associates
364 Benson Road
Northbridge, MA 01534
14-Apr-88 Page 30